home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-26 | 1.2 KB | 35 lines | [TEXT/ScoM] |
- ACCESSING MOTIVE SLOTS
-
- >Does anyone knows why the SCOM 4.0 compiler detects a problem with setf
- >in this code?
- >
- >(def-motive pp
- >symbol '(a b c d e f))
- >(msymbol pp)
- >(setf (msymbol pp) '(a b c))
- >(msymbol pp)
- >
- >The interpreter report:
- >;Interpreter warnings :
- >; Undeclared free variable pp, in an anonymous lambda form.
-
- You have to use the following:
-
- (setf (slot-value pp 'symbol) '(a b c))
-
- Motive class is as below. It has accessors which start with m. MCL
- mechanism seems to have some restrictions using setf with accessors.
-
- (defclass motive ()
- ((symbol :initarg :symbol :initform nil :accessor msymbol)
- (length :initarg :length :initform nil :accessor mlength)
- (velocity :initarg :velocity :initform nil :accessor mvelocity)
- (channel :initarg :channel :initform nil :accessor mchannel)
- (program :initarg :program :initform nil :accessor mprogram)
- (controller :initarg :controller :initform nil :accessor mcontroller)
- (duration :initarg :duration :initform nil :accessor mduration)
- (tuning :initarg :tuning :initform nil :accessor mtuning)
- (groove :initarg :groove :initform nil :accessor mgroove)
- (zone :initarg :zone :initform nil :accessor mzone)
- (tonality :initarg :tonality :initform nil :accessor mtonality)))
-